Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Alias field to backends, support at CLI and store levels #150

Merged
merged 6 commits into from
Oct 26, 2023

Conversation

cdmistman
Copy link
Contributor

Why

#147 made a couple of breaking changes to the CLI:

  • removed python-python2-poetry backend
  • simplified python-python3-poetry backend name to python3-poetry

unfortunately, the latter change will cause all upm caches to be invalidated, and invocations of upm -l python-python3-poetry will break.

What changed

  • Added Alias field to api.LanguageBackend
  • When resolving the backend via -l flag, if resolving via Name of the LanguageBackend fails, try to resolve against the Alias
  • The logic for reading from the cache store is now:
    • check if there's a match for Name, if there is then use that cache
    • check if there's a match for Alias, if there is then use that cache
  • The logic for creating a cache entry in the store is now:
    • check if there's a match for Name, exit function if true
    • check if there's a match for Alias, exit function if true
    • create an entry for Name

@cdmistman cdmistman requested a review from a team as a code owner October 26, 2023 16:44
@cdmistman cdmistman requested review from ryantm and removed request for a team October 26, 2023 16:44
internal/backends/backends.go Show resolved Hide resolved
@cdmistman cdmistman merged commit d41cb04 into main Oct 26, 2023
1 check passed
@cdmistman cdmistman deleted the cad/dont-break-python3-on-cli branch October 26, 2023 18:17
@blast-hardcheese blast-hardcheese added the enhancement New feature or request label Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants